import java.util.Scanner;

public class FactN {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(facN(n));
    }
    public static int facN(int n)
    {
        if (n == 1)
            return 1;
        return n * facN(n-1);
    }
}
